#include <iostream>
#include <algorithm>
#include <stdio.h>
using namespace std;

int pos[100003];
int n, c;
int mmax;

bool isput(int dis)
{
	int i, tot, count;

	count = 1;
	for (i=2, tot=0; i<=n && count<c; ++i)
	{
		tot += pos[i] - pos[i-1];
		if ( tot >= dis )
		{
			count++;
			tot=0;
		}
	}
	if (count==c) return true;
	return false;
}

int main()
{
	int i;
	int left, right, mid;
//	while (cin >> n >> c)
	while (scanf("%d%d", &n, &c)!=EOF)
	{
		mmax=0;
		for (i=1; i<=n; ++i)
			scanf("%d", &pos[i]);
//			cin >> pos[i];
		sort( pos+1, pos+n+1 );
		
		left = 0;
		right = pos[n];
		while ( left <= right)
		{
			mid = (left + right)/2;
			if (isput(mid))
			{
				if (mmax < mid) mmax = mid;
				left = mid+1;
			}
			else
				right = mid - 1;
		}
//		cout << max << endl;
		printf("%d\n", mmax);
	}


	return 0;
}